<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cr-num: Libcroco Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Libcroco Reference Manual">
<link rel="up" href="ch01.html" title="Extensive APIs description">
<link rel="prev" href="libcroco-cr-input.html" title="cr-input">
<link rel="next" href="libcroco-cr-om-parser.html" title="cr-om-parser">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libcroco-cr-num.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libcroco-cr-input.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libcroco-cr-om-parser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libcroco-cr-num"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libcroco-cr-num.top_of_page"></a>cr-num</span></h2>
<p>cr-num</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libcroco-cr-num.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="returnvalue">CRNum</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-new" title="cr_num_new ()">cr_num_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="returnvalue">CRNum</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-new-with-val" title="cr_num_new_with_val ()">cr_num_new_with_val</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="returnvalue">CRNum</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-dup" title="cr_num_dup ()">cr_num_dup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-to-string" title="cr_num_to_string ()">cr_num_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-copy" title="cr_num_copy ()">cr_num_copy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-set" title="cr_num_set ()">cr_num_set</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-is-fixed-length" title="cr_num_is_fixed_length ()">cr_num_is_fixed_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-num.html#cr-num-destroy" title="cr_num_destroy ()">cr_num_destroy</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libcroco-cr-num.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum">CRNum</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libcroco-cr-num.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libcroco-cr-num.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="cr-num-new"></a><h3>cr_num_new ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="returnvalue">CRNum</span></a> *
cr_num_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p>
<p>Returns the newly built instance of
<a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="cr-num-new-with-val"></a><h3>cr_num_new_with_val ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="returnvalue">CRNum</span></a> *
cr_num_new_with_val (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> a_val</code></em>,
                     <em class="parameter"><code><span class="type">enum CRNumType</span> a_type</code></em>);</pre>
<p>A constructor of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p>
<p>Returns the newly built instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> or
NULL if an error arises.</p>
<div class="refsect3">
<a name="id-1.2.10.6.3.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a_val</p></td>
<td class="parameter_description"><p>the numerical value of the number.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>a_type</p></td>
<td class="parameter_description"><p>the type of number.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-num-dup"></a><h3>cr_num_dup ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="returnvalue">CRNum</span></a> *
cr_num_dup (<em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> const *a_this</code></em>);</pre>
<p>Duplicates an instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a></p>
<p>Returns the newly created (duplicated) instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.
Must be freed by <a class="link" href="libcroco-cr-num.html#cr-num-destroy" title="cr_num_destroy ()"><code class="function">cr_num_destroy()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.10.6.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>a_this</p></td>
<td class="parameter_description"><p>the instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> to duplicate.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-num-to-string"></a><h3>cr_num_to_string ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
cr_num_to_string (<em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> const *a_this</code></em>);</pre>
<p>Returns the newly built string representation
of the current instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>. The returned
string is NULL terminated. The caller *must*
free the returned string.</p>
<div class="refsect3">
<a name="id-1.2.10.6.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>a_this</p></td>
<td class="parameter_description"><p>the current instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-num-copy"></a><h3>cr_num_copy ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_num_copy (<em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> *a_dest</code></em>,
             <em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> const *a_src</code></em>);</pre>
<p>Copies an instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p>
<p>Returns CR_OK upon successful completion, an
error code otherwise.</p>
<div class="refsect3">
<a name="id-1.2.10.6.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a_src</p></td>
<td class="parameter_description"><p>the instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> to copy.
Must be non NULL.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>a_dest</p></td>
<td class="parameter_description"><p>the destination of the copy.
Must be non NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-num-set"></a><h3>cr_num_set ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_num_set (<em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> *a_this</code></em>,
            <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> a_val</code></em>,
            <em class="parameter"><code><span class="type">enum CRNumType</span> a_type</code></em>);</pre>
<p>Returns CR_OK upon succesful completion, an error code otherwise.</p>
<div class="refsect3">
<a name="id-1.2.10.6.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a_this</p></td>
<td class="parameter_description"><p>the current instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> to be set.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>a_val</p></td>
<td class="parameter_description"><p>the new numerical value to be hold by the current
instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>a_type</p></td>
<td class="parameter_description"><p>the new type of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-num-is-fixed-length"></a><h3>cr_num_is_fixed_length ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
cr_num_is_fixed_length (<em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> const *a_this</code></em>);</pre>
<p>Tests if the current instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> is a fixed
length value or not. Typically a fixed length value
is anything from NUM_LENGTH_EM to NUM_LENGTH_PC.
See the definition of <span class="type">CRNumType</span> to see what we mean.</p>
<p>Returns TRUE if the instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> is a fixed length number,
FALSE otherwise.</p>
<div class="refsect3">
<a name="id-1.2.10.6.8.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>a_this</p></td>
<td class="parameter_description"><p>the current instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> .</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-num-destroy"></a><h3>cr_num_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cr_num_destroy (<em class="parameter"><code><a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a> *a_this</code></em>);</pre>
<p>The destructor of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p>
<div class="refsect3">
<a name="id-1.2.10.6.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>a_this</p></td>
<td class="parameter_description"><p>the this pointer of
the current instance of <a class="link" href="libcroco-cr-num.html#CRNum" title="struct CRNum"><span class="type">CRNum</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="libcroco-cr-num.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CRNum"></a><h3>struct CRNum</h3>
<pre class="programlisting">struct CRNum {
        enum CRNumType type ;
        gdouble val ;
        CRParsingLocation location ;
};
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>